<?php
/**
 * User: aka
 * Date: 2018/6/25
 * Time: 2:21
 */

namespace app\backstage\controller;


use app\common\db\DbOperation;
use app\common\request\RequestOperation;
use app\common\tree\DataTree;

class Admin
{
    public $request;
    public $dataTree;

    public function __construct()
    {
        !empty(session('user')) ?: die();
        $this->request = new RequestOperation();
        $this->dataTree = new DataTree();
        $this->dbOperation = new DbOperation();
    }

    public function __destruct()
    {
        unset($this->request);
        unset($this->dataTree);
        unset($this->dbOperation);
    }

    protected function getRequestOperation() : RequestOperation
    {
        return $this->request;
    }

    protected function getDataTree() : DataTree
    {
        return $this->dataTree;
    }

    protected function getDbOperation() : DbOperation
    {
        return $this->dbOperation;
    }
}